package com.hibase.quartz.service;

import com.github.pagehelper.PageInfo;
import com.hibase.core.mybatis.service.BaseService;
import com.hibase.quartz.entity.MdsJob;
import com.hibase.quartz.entity.vo.MdsImmediateJob;
import com.hibase.quartz.entity.vo.MdsJobSearchVO;
import org.quartz.SchedulerException;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author LYL
 * @since 2020-11-18
 */
public interface MdsJobService extends BaseService<MdsJob> {

    /**
     * 查询列表
     *
     * @param searchVO
     * @return
     */
    PageInfo<MdsJob> selectMdsJobList(MdsJobSearchVO searchVO);

    /**
     * 改变调度器中任务状态
     *
     * @param entity
     * @return
     */
    void saveMdsJob(MdsJob entity);

    /**
     * 修改数据库中 entity的基本信息
     * @param entity
     * @return
     */
    MdsJob saveJobEntity(MdsJob entity);

    /**
     * 查询详情
     *
     * @param id
     * @return
     */
    MdsJob viewMdsJob(String id);

    /**
     * 删除
     *
     * @param id
     */
    void deleteMdsJob(String id);

    void deleteMdsJob(List<String> ids);

    void reStartAllJobs() throws SchedulerException;

    void immediateJob (MdsImmediateJob mdsImmediateJob);

    void runJob(MdsJob mdsJob);
}
